From ceefc1cce7477e6d17eb96c0b7e1e967e0d43e64 Mon Sep 17 00:00:00 2001 From: Anton Gladky Date: Sat, 7 Nov 2020 23:08:00 +0100 Subject: [PATCH] Update patches --- debian/patches/pyth | 84 +++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + debian/python3-vtk9.install | 2 +- debian/rules | 13 +----- 4 files changed, 87 insertions(+), 13 deletions(-) create mode 100644 debian/patches/pyth diff --git a/debian/patches/pyth b/debian/patches/pyth new file mode 100644 index 000000000..a21fe5508 --- /dev/null +++ b/debian/patches/pyth @@ -0,0 +1,84 @@ +Description: +Author: Johannes Schauer + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: https://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: 2020-11-06 + +Index: vtk9-9.0.1+dfsg1/CMake/vtkModuleWrapPython.cmake +=================================================================== +--- vtk9-9.0.1+dfsg1.orig/CMake/vtkModuleWrapPython.cmake ++++ vtk9-9.0.1+dfsg1/CMake/vtkModuleWrapPython.cmake +@@ -33,8 +33,8 @@ vtk_module_python_default_destination(]) + ~~~ + +-By default, the destination is `${CMAKE_INSTALL_BINDIR}/Lib/site-packages` on +-Windows and `${CMAKE_INSTALL_LIBDIR}/python/site-packages` otherwise. ++By default, the destination is `${CMAKE_INSTALL_BINDIR}/Lib/dist-packages` on ++Windows and `${CMAKE_INSTALL_LIBDIR}/python/dist-packages` otherwise. + + `` must be one of `2` or `3`. If not specified, it defaults to + the value of `${VTK_PYTHON_VERSION}`. +@@ -84,7 +84,7 @@ function (vtk_module_python_default_dest + "for Python modules.") + set(_vtk_python_version_suffix) + endif () +- set(destination "${CMAKE_INSTALL_LIBDIR}/python${_vtk_python_version_suffix}/site-packages") ++ set(destination "lib/python3/dist-packages") + endif () + + set("${var}" "${destination}" PARENT_SCOPE) +Index: vtk9-9.0.1+dfsg1/Utilities/Python/CMakeLists.txt +=================================================================== +--- vtk9-9.0.1+dfsg1.orig/Utilities/Python/CMakeLists.txt ++++ vtk9-9.0.1+dfsg1/Utilities/Python/CMakeLists.txt +@@ -77,7 +77,7 @@ if (NOT VTK_PYTHON_SITE_PACKAGES_SUFFIX) + set(VTK_PYTHON_SITE_PACKAGES_SUFFIX "Lib/site-packages") + else () + set(VTK_PYTHON_SITE_PACKAGES_SUFFIX +- "python${vtk_python_version_pair}/site-packages") ++ "python3/dist-packages") + endif () + endif () +Index: vtk9-9.0.1+dfsg1/Wrapping/Python/CMakeLists.txt +=================================================================== +--- vtk9-9.0.1+dfsg1.orig/Wrapping/Python/CMakeLists.txt ++++ vtk9-9.0.1+dfsg1/Wrapping/Python/CMakeLists.txt +@@ -23,21 +23,21 @@ endif () + + # The interpreters are not supported in wheel builds, so skip them. + if (NOT VTK_WHEEL_BUILD) +- add_executable(vtkpython ++ add_executable(vtkpython-9.0 + vtkpython.rc + vtkPythonAppInit.cxx) +- target_link_libraries(vtkpython ++ target_link_libraries(vtkpython-9.0 + PRIVATE + VTK::WrappingPythonCore + VTK::PythonInterpreter + VTK::Python + VTK::vtkpythonmodules + VTK::vtksys) +- add_executable(VTK::vtkpython ALIAS vtkpython) ++ add_executable(VTK::vtkpython-9.0 ALIAS vtkpython-9.0) + if (VTK_INSTALL_PYTHON_EXES) + install( +- TARGETS vtkpython +- EXPORT VTKPython ++ TARGETS vtkpython-9.0 ++ EXPORT VTK9Python + DESTINATION "${CMAKE_INSTALL_BINDIR}") + endif () + + diff --git a/debian/patches/series b/debian/patches/series index 890976963..c9101d4f8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,3 +10,4 @@ #108_Doxygen-use-mathjax.patch 110_do_not_link_against_socket.patch drop_medical_example.patch +pyth diff --git a/debian/python3-vtk9.install b/debian/python3-vtk9.install index 8caa0e1bd..684d31a0b 100644 --- a/debian/python3-vtk9.install +++ b/debian/python3-vtk9.install @@ -1,2 +1,2 @@ usr/lib/python3 -usr/bin/vtk9python +usr/bin/vtkpython-9.0 diff --git a/debian/rules b/debian/rules index cb20e3575..2aa0b58c9 100755 --- a/debian/rules +++ b/debian/rules @@ -46,6 +46,7 @@ extra_flags += \ -DVTK_MODULE_USE_EXTERNAL_VTK_sqlite:BOOL=ON \ -DVTK_MODULE_USE_EXTERNAL_VTK_theora:BOOL=ON \ -DVTK_MODULE_USE_EXTERNAL_VTK_tiff:BOOL=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_utf8:BOOL=ON \ -DVTK_MODULE_USE_EXTERNAL_VTK_zlib:BOOL=ON \ -DVTK_MODULE_USE_EXTERNAL_VTK_doubleconversion:BOOL=ON \ -DVTK_PYTHON_VERSION:STRING=3 \ @@ -78,19 +79,7 @@ override_dh_auto_build-arch: dh_auto_build override_dh_auto_install: - pwd dh_auto_install -X.pyc -X.pyo # Correct headers for paraview mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/java/vtk.jar $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/java/vtk9.jar - mv $(CURDIR)/debian/tmp/usr/bin/vtkpython $(CURDIR)/debian/tmp/usr/bin/vtk9python - mkdir -p $(CURDIR)/debian/tmp/usr/lib/python3 - mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/python3.9/site-packages $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages sed -i -e "s/FATAL_ERROR/STATUS/g" $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/vtk-9.0/VTK-targets.cmake - chrpath -d $(CURDIR)/debian/tmp/usr/bin/vtk9python - - find $(CURDIR)/debian/tmp/ -name "*.pyc" | xargs rm -f - find $(CURDIR)/debian/tmp/ -name "*.pyo" | xargs rm -f - -override_dh_install-arch: - dh_install -a - find $(CURDIR)/debian/libvtk9-dev/ -name "libvtkRenderingPythonTkWidgets.so" -exec rm {} \; -- 2.30.2